<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const $p1 = $('<p>一段文字</p>')
        const $p2 = $('<p>一段文字</p>')
        const $p3 = $('<p>一段文字</p>')
        $('#container').append($p1).append($p2).append($p3)
        console.log('length', $('#container').children().length); //3 

    </script>
</body>

</html>